package com.vote.utils;

import javax.servlet.http.HttpServletRequest;

import com.vote.model.User;


public class HostHelper {
	
	private final static String userStr = "login_vote_user";
	
    public static User getHost(HttpServletRequest request){
        return (User) request.getSession().getAttribute(userStr);
    }
    
    public static boolean setHost(HttpServletRequest request, User host){
    	request.getSession().setAttribute(userStr, host);
    	return true;
    }
    public static boolean removeHost(HttpServletRequest request)
    {
    	request.getSession().removeAttribute(userStr);
    	return true;
    }

}
